Release 10.1A: OpenEdge Development:
Java Open Clients
Defining the schema for a ProDataSet parameter
Defining the schema for a Progress 4GL ProDataSet (
Note: This is a condensed description with reference to the Java OpenAPI. For complete information on defining the schema for a ProDataSet parameter, see Chapter 5, " Accessing Progress ProDataSets."DATASETorDATASET-HANDLE) parameter is a multi-step process.
![]()
To define the schema for a ProDataSet parameter:
- Define a
com.progress.open4gl.ProDataGraphMetaDataobject to specify the schema.- Define the temp-tables for the
ProDataGraphMetaDataobject.- Define the data-relations for the
ProDataGraphMetaDataobject.- If the parameter is for input or input-output, define a
ProDataGraphusing theProDataGraphMetaDataobject to hold the parameter value.- Specify the
ProDataGraphMetaDataobject and anyProDataGraph(for input or input-output) as a ProDataSet parameter to yourParamArrayobject using the appropriate set parameter method.Defining a ProDataGraphMetaData object
For each ProDataSet parameter you must define a
com.progress.open4gl.ProDataGraphMetaDataobject. You use this object to specify the schema for the ProDataSet when you set theDATASETorDATASET-HANDLEparameter in theParamArrayobject. You can create an instance of this object using the following constructor:
proDataSetNameSpecifies the ProDataSet name in the 4GL.
Defining the temp-tables for the ProDataGraphMetaData object
You must define the meta data for each temp-table defined by the
ProDataGraphMetaData. For more information, see the "Defining the schema for temp-tables in a ProDataSet" section. You can then add the temp-table meta data (ProDataObjectMetaData) to theProDataGraphMetaDataobject using the followingProDataGraphMetaDatamethod:
doMetaDataSpecifies the meta data for a temp-table.
Defining the data-relations for the ProDataGraphMetaData object
You must define any data-relations that are defined for the 4GL ProDataSet using
com.progress.open4gl.ProDataRelationMetaDataobjects. You can create aProDataRelationMetaDataobject for each data-relation between a parent and child temp-table using the following constructor:
dataRelationNameSpecifies the name of the
ProDataRelationMetaDataobject.parentIxSpecifies a 0-based index to a parent temp-table (ProDataObject collection) that corresponds to an index into the array of table names returned by the ProDataGraphMetaData
getTableNames()method.childIxSpecifies a 0-based index to a child temp-table (ProDataObject collection) that corresponds to an index into the array of table names returned by the ProDataGraphMetaData
getTableNames()method.numPairsSpecifies the number of column property pairs (key field pairs) that represent this relationship. This allows multiple fields to represent a key relationship between the parent and child temp-table.
pairsListSpecifies a
Note: For the equivalentStringcontaining a comma-separated list of field names. The list consists ofnumPairsfield pairs, where the parent temp-table field name for each pair is followed by its matching child temp-table field name. The data types of the named parent and child temp-table field pairs must be comparable.ProDataRelationMetaData()constructor in the .NET OpenAPI, the order of parent and child field names in thepairsListparameter is reversed. For more information, see OpenEdge Development: .NET Open Clients .You can add each data-relation definition to the
ProDataGraphMetaDataobject using the following method:
drMetaDataSpecifies a data-relation to include in the
ProDataGraphMetaDataobject.Define a ProDataGraph for any input parameter
If the parameter is for input or input-output, define the
com.progress.open4gl.ProDataGraphto hold the value using the following constructor:
dgmdSpecifies the
ProDataGraphMetaDatathat you have defined for the parameter.Specifying the ProDataGraphMetaData object for a ProDataSet parameter
Specify the
ProDataGraphMetaDataobject together with any inputProDataGraphby passing them as parameters of theaddDataset()oraddDatasetHandle()method that you use to add the ProDataSet parameter to theParamArrayobject. For more information, see the "DATASET or DATASET-HANDLE" section.This is an example that adds a temp-table parameter defined with no indexes:
For more information on the objects and methods for defining the schema of a ProDataSet parameter and on working with the
ProDataGraphused to map a ProDataSet parameter, see Chapter 5, " Accessing Progress ProDataSets."
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |